﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using BUS;

namespace BUS
{
   public class KetQuaBUS
    {
        public static bool NhapBangDiemMonHoc(string maMonHoc, string maHocSinh, float diemMuoiLamPhut, float diemMotTiet, float diemGiuaKy, float diemCuoiKy, string hocKy)
        {
            if (diemCuoiKy < 0 || diemCuoiKy > 10 || diemMuoiLamPhut < 0 || diemMuoiLamPhut > 10 || diemGiuaKy < 0 || diemGiuaKy > 10 || diemCuoiKy < 0 || diemCuoiKy > 10)
                return false;

           

            if (HocSinhBUS.KiemTraMaHocSinh(maHocSinh) == false || MonHocBUS.KiemTraMaMonHoc(maMonHoc) == false)
            {
               
                return false ; 
            }

            return KetQuaDAO.NhapBangDiemMonHoc(  maMonHoc,  maHocSinh,  diemMuoiLamPhut,  diemMotTiet,  diemGiuaKy,  diemCuoiKy , hocKy);
            
        }
    }
}
